package model

import (
	"gorm.io/gorm"
	"time"
)

type User struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Account   string         `gorm:"column:account;type:varchar(255);comment:账号;not null;" json:"account"`     // 账号
	PassWord  string         `gorm:"column:pass_word;type:varchar(255);comment:密码;not null;" json:"pass_word"` // 密码
}

func (*User) TableName() string {
	return "user"
}
